package org.bigtree.example.common.setup;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;

/**
 * @author bigTree
 * @since 2025/6/14
 */
@Slf4j
public class ApplicationRunnerExample implements ApplicationRunner {
    @Override
    public void run(ApplicationArguments args) {
        // 耗时逻辑请使用异步或其他方式, 否则导致应用启动耗时太久
        log.info("Hello World, ApplicationRunner Example !");
        args.getOptionNames().forEach(key -> System.out.println(STR."\{key} : \{args.getOptionValues(key)}"));
    }
}
